import axios from "axios";


const request = axios.create({
    baseURL: '/api',
    timeout: 600000,
    headers: {
        'console-token': 'eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MjE1Mzg3MDAsInV1aWQiOiIzMDUyZjViOC0wNGNiLTRlOGYtYWE2Zi1mYmYxNDZkMTFiOWMiLCJ1c2VybmFtZSI6ImFkbWluaXN0cmF0b3IifQ.beiHR3076vx37Z5X0juDKfhqZarDSxYV5PNgctXMlbQ'
    }
})


request.interceptors.response.use(
    (response) => {
        //成功回调
        return response.data
    },
    (error) => {
        //失败回调
        return Promise.reject(error)
    }
)

export default request;